Optimal. Leaf size=112 \[ -\frac {2 \left (c d^2+a e^2\right )}{e^2 (e f-d g) \sqrt {d+e x}}+\frac {2 c \sqrt {d+e x}}{e^2 g}-\frac {2 \left (c f^2+a g^2\right ) \tan ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {912, 1275, 211}
\begin {gather*} -\frac {2 \left (a g^2+c f^2\right ) \text {ArcTan}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}}-\frac {2 \left (a e^2+c d^2\right )}{e^2 \sqrt {d+e x} (e f-d g)}+\frac {2 c \sqrt {d+e x}}{e^2 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 912
Rule 1275
Rubi steps
\begin {align*} \int \frac {a+c x^2}{(d+e x)^{3/2} (f+g x)} \, dx &=\frac {2 \text {Subst}\left (\int \frac {\frac {c d^2+a e^2}{e^2}-\frac {2 c d x^2}{e^2}+\frac {c x^4}{e^2}}{x^2 \left (\frac {e f-d g}{e}+\frac {g x^2}{e}\right )} \, dx,x,\sqrt {d+e x}\right )}{e}\\ &=\frac {2 \text {Subst}\left (\int \left (\frac {c}{e g}+\frac {c d^2+a e^2}{e (e f-d g) x^2}-\frac {e \left (c f^2+a g^2\right )}{g (-e f+d g) \left (-e f+d g-g x^2\right )}\right ) \, dx,x,\sqrt {d+e x}\right )}{e}\\ &=-\frac {2 \left (c d^2+a e^2\right )}{e^2 (e f-d g) \sqrt {d+e x}}+\frac {2 c \sqrt {d+e x}}{e^2 g}+\frac {\left (2 \left (c f^2+a g^2\right )\right ) \text {Subst}\left (\int \frac {1}{-e f+d g-g x^2} \, dx,x,\sqrt {d+e x}\right )}{g (e f-d g)}\\ &=-\frac {2 \left (c d^2+a e^2\right )}{e^2 (e f-d g) \sqrt {d+e x}}+\frac {2 c \sqrt {d+e x}}{e^2 g}-\frac {2 \left (c f^2+a g^2\right ) \tan ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 118, normalized size = 1.05 \begin {gather*} -\frac {2 \left (c d^2 g+a e^2 g-c e f (d+e x)+c d g (d+e x)\right )}{e^2 g (e f-d g) \sqrt {d+e x}}-\frac {2 \left (c f^2+a g^2\right ) \tan ^{-1}\left (\frac {\sqrt {g} \sqrt {d+e x}}{\sqrt {e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 114, normalized size = 1.02
method | result | size |
derivativedivides | \(\frac {\frac {2 c \sqrt {e x +d}}{g}-\frac {2 \left (-a \,e^{2}-c \,d^{2}\right )}{\left (d g -e f \right ) \sqrt {e x +d}}-\frac {2 e^{2} \left (a \,g^{2}+c \,f^{2}\right ) \arctanh \left (\frac {g \sqrt {e x +d}}{\sqrt {\left (d g -e f \right ) g}}\right )}{\left (d g -e f \right ) g \sqrt {\left (d g -e f \right ) g}}}{e^{2}}\) | \(114\) |
default | \(\frac {\frac {2 c \sqrt {e x +d}}{g}-\frac {2 \left (-a \,e^{2}-c \,d^{2}\right )}{\left (d g -e f \right ) \sqrt {e x +d}}-\frac {2 e^{2} \left (a \,g^{2}+c \,f^{2}\right ) \arctanh \left (\frac {g \sqrt {e x +d}}{\sqrt {\left (d g -e f \right ) g}}\right )}{\left (d g -e f \right ) g \sqrt {\left (d g -e f \right ) g}}}{e^{2}}\) | \(114\) |
risch | \(\frac {2 c \sqrt {e x +d}}{e^{2} g}-\frac {2 \left (-\frac {\left (a \,e^{2}+c \,d^{2}\right ) g}{\left (d g -e f \right ) \sqrt {e x +d}}+\frac {e^{2} \left (a \,g^{2}+c \,f^{2}\right ) \arctanh \left (\frac {g \sqrt {e x +d}}{\sqrt {\left (d g -e f \right ) g}}\right )}{\left (d g -e f \right ) \sqrt {\left (d g -e f \right ) g}}\right )}{g \,e^{2}}\) | \(117\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 239 vs.
\(2 (101) = 202\).
time = 3.34, size = 493, normalized size = 4.40 \begin {gather*} \left [-\frac {\sqrt {d g^{2} - f g e} {\left ({\left (c f^{2} + a g^{2}\right )} x e^{3} + {\left (c d f^{2} + a d g^{2}\right )} e^{2}\right )} \log \left (\frac {2 \, d g + {\left (g x - f\right )} e + 2 \, \sqrt {d g^{2} - f g e} \sqrt {x e + d}}{g x + f}\right ) - 2 \, {\left (2 \, c d^{3} g^{3} + {\left (c f^{2} g x - a f g^{2}\right )} e^{3} - {\left (2 \, c d f g^{2} x - c d f^{2} g - a d g^{3}\right )} e^{2} + {\left (c d^{2} g^{3} x - 3 \, c d^{2} f g^{2}\right )} e\right )} \sqrt {x e + d}}{d^{3} g^{4} e^{2} + f^{2} g^{2} x e^{5} - {\left (2 \, d f g^{3} x - d f^{2} g^{2}\right )} e^{4} + {\left (d^{2} g^{4} x - 2 \, d^{2} f g^{3}\right )} e^{3}}, \frac {2 \, {\left (\sqrt {-d g^{2} + f g e} {\left ({\left (c f^{2} + a g^{2}\right )} x e^{3} + {\left (c d f^{2} + a d g^{2}\right )} e^{2}\right )} \arctan \left (\frac {\sqrt {-d g^{2} + f g e} \sqrt {x e + d}}{g x e + d g}\right ) + {\left (2 \, c d^{3} g^{3} + {\left (c f^{2} g x - a f g^{2}\right )} e^{3} - {\left (2 \, c d f g^{2} x - c d f^{2} g - a d g^{3}\right )} e^{2} + {\left (c d^{2} g^{3} x - 3 \, c d^{2} f g^{2}\right )} e\right )} \sqrt {x e + d}\right )}}{d^{3} g^{4} e^{2} + f^{2} g^{2} x e^{5} - {\left (2 \, d f g^{3} x - d f^{2} g^{2}\right )} e^{4} + {\left (d^{2} g^{4} x - 2 \, d^{2} f g^{3}\right )} e^{3}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 16.96, size = 107, normalized size = 0.96 \begin {gather*} \frac {2 c \sqrt {d + e x}}{e^{2} g} + \frac {2 \left (a g^{2} + c f^{2}\right ) \operatorname {atan}{\left (\frac {\sqrt {d + e x}}{\sqrt {- \frac {d g - e f}{g}}} \right )}}{g^{2} \sqrt {- \frac {d g - e f}{g}} \left (d g - e f\right )} + \frac {2 \left (a e^{2} + c d^{2}\right )}{e^{2} \sqrt {d + e x} \left (d g - e f\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.99, size = 116, normalized size = 1.04 \begin {gather*} \frac {2 \, \sqrt {x e + d} c e^{\left (-2\right )}}{g} + \frac {2 \, {\left (c f^{2} + a g^{2}\right )} \arctan \left (\frac {\sqrt {x e + d} g}{\sqrt {-d g^{2} + f g e}}\right )}{{\left (d g^{2} - f g e\right )} \sqrt {-d g^{2} + f g e}} + \frac {2 \, {\left (c d^{2} + a e^{2}\right )}}{{\left (d g e^{2} - f e^{3}\right )} \sqrt {x e + d}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 124, normalized size = 1.11 \begin {gather*} \frac {2\,c\,\sqrt {d+e\,x}}{e^2\,g}+\frac {2\,\left (c\,g\,d^2+a\,g\,e^2\right )}{e^2\,g\,\left (d\,g-e\,f\right )\,\sqrt {d+e\,x}}+\frac {\mathrm {atan}\left (\frac {d\,g^{3/2}\,\sqrt {d+e\,x}\,1{}\mathrm {i}-e\,f\,\sqrt {g}\,\sqrt {d+e\,x}\,1{}\mathrm {i}}{{\left (d\,g-e\,f\right )}^{3/2}}\right )\,\left (c\,f^2+a\,g^2\right )\,2{}\mathrm {i}}{g^{3/2}\,{\left (d\,g-e\,f\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________